package one;

import java.util.Arrays;

public class A015 {


    public static void main(String[] args) {
        int[] a = {1,2,3,4,5,6,7};
        //rotate(a,3);
    }

    public void rotate(int[] nums, int k) {
            int n = nums.length;
            int[] a = new int[n];
            for(int i=0;i<n;i++) {
                a[(i+k)%n]=nums[i];
            }
            for(int i=0;i<n;i++) {
                nums[i]=a[i];
            }
        }

}
